﻿Imports System.Diagnostics.Contracts
Imports CookComputing.XmlRpc
Imports System.Security.Cryptography.X509Certificates
Imports System.Net
Imports System.Text

Namespace XmlRpc.Interfaces

    ''' <summary>
    ''' Defines general methods to retrieve media information.
    ''' </summary>
    ''' <remarks></remarks>
    <XmlRpcUrl("http://api.fotolia.com/Xmlrpc/rpc")>
    Public Interface IUser
        Inherits IFotoliaBase

#Region "xmlrpc.test"
        ''' <summary>
        ''' This method is a test method which returns success if connection is valid.
        ''' </summary>
        ''' <param name="apiKey">Authentication.</param>
        ''' <returns></returns>
        ''' <remarks>You need a valid api key to use the API</remarks>
        <XmlRpcMethod("xmlrpc.test")>
        Function Test(apiKey As XmlRpc.Authentication) As XmlRpcStruct

        ''' <summary>
        ''' This method is a test method which returns success if connection is valid using Async mode.
        ''' </summary>
        ''' <param name="apiKey">Authentication.</param>
        ''' <returns></returns>
        ''' <remarks>You need a valid api key to use the API</remarks>
        <XmlRpcBegin("xmlrpc.test")>
        Function BeginTest(apiKey As XmlRpc.Authentication, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This method is a test method which returns success if connection is valid using Async mode.
        ''' </summary>
        ''' <param name="apiKey">Authentication.</param>
        ''' <returns></returns>
        ''' <remarks>You need a valid api key to use the API</remarks>
        <XmlRpcBegin("xmlrpc.test")>
        Function BeginTest(apiKey As XmlRpc.Authentication, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' This method implements the End part of BeginTest method.
        ''' </summary>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.test")>
        Function EndTest(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.getData"

        ''' <summary>
        ''' This methods returns fotolia data.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcMethod("xmlrpc.getData")>
        Function GetData(apiKey As XmlRpc.Authentication) As XmlRpcStruct


        ''' <summary>
        ''' This methods returns fotolia data using async pattern.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.getData")>
        Function BeginGetData(apiKey As XmlRpc.Authentication, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods returns fotolia data using async pattern.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The object state.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.getData")>
        Function BeginGetData(apiKey As XmlRpc.Authentication, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Implements the End part of async pattern.
        ''' </summary>
        ''' <param name="iasr">The async result instance.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.getData")>
        Function EndGetData(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.loginUser"
        ''' <summary>
        ''' This method allows you to create an authenticated session to be able to use methods which need authentication.
        ''' </summary>
        ''' <param name="apiKey">The Api key.</param>
        ''' <param name="login">User Login. Existing login.</param>
        ''' <param name="pass">User Password. Password corresponding to login</param>
        ''' <returns>Authenticated session id (needed for methods needed authentication)</returns>
        ''' <remarks></remarks>
        <XmlRpcMethod("xmlrpc.loginUser")>
        Function LoginUser(apiKey As XmlRpc.Authentication, login As String, pass As String) As XmlRpcStruct


        ''' <summary>
        ''' This method allows you to create an authenticated session to be able to use methods which need authentication.
        ''' </summary>
        ''' <param name="apiKey">The Api key.</param>
        ''' <param name="login">User Login. Existing login.</param>
        ''' <param name="pass">User Password. Password corresponding to login</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.loginUser")>
        Function BeginLoginUser(apiKey As XmlRpc.Authentication, login As String, pass As String, acb As AsyncCallback) As IAsyncResult


        ''' <summary>
        ''' This method allows you to create an authenticated session to be able to use methods which need authentication.
        ''' </summary>
        ''' <param name="apiKey">The Api key.</param>
        ''' <param name="login">User Login. Existing login.</param>
        ''' <param name="pass">User Password. Password corresponding to login</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.loginUser")>
        Function BeginLoginUser(apiKey As XmlRpc.Authentication, login As String, pass As String, acb As AsyncCallback, state As Object) As IAsyncResult


        ''' <summary>
        ''' Ends the login user.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.loginUser")>
        Function EndLoginUser(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.logoutUser"

        ''' <summary>
        ''' This method kills the authentified session. It is equivalent to logout from Fotolia website.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcMethod("xmlrpc.logoutUser")>
        Function LogoutUser(apiKey As XmlRpc.Authentication, sessionId As String) As XmlRpcStruct

        ''' <summary>
        ''' This method kills the authentified session in async mode. It is equivalent to logout from Fotolia website.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.logoutUser")>
        Function BeginLogoutUser(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This method kills the authentified session in async mode. It is equivalent to logout from Fotolia website.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.logoutUser")>
        Function BeginLogoutUser(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the logout user.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.logoutUser")>
        Function EndLogoutUser(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.getUserData"

        ''' <summary>
        ''' This methods return data for logged user. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The logged user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.getUserData")>
        Function GetUserData(apiKey As XmlRpc.Authentication, sessionId As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods return data for logged user (in async mode). 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The logged user session id.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserData")>
        Function BeginGetUserData(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods return data for logged user (in async mode). 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The logged user session id.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state object.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserData")>
        Function BeginGetUserData(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback, state As Object) As IAsyncResult


        ''' <summary>
        ''' Ends the get user data.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.getUserData")>
        Function EndGetUserData(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.getUserStats"

        ''' <summary>
        ''' This methods returns statistics for logged user. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.getUserStats")>
        Function GetUserStats(apiKey As XmlRpc.Authentication, sessionId As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods returns statistics for logged user in async mode. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="acb">The async callback</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserStats")>
        Function BeginGetUserStats(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods returns statistics for logged user in async mode. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="acb">The async callback</param>
        ''' <param name="state">The user object state.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserStats")>
        Function BeginGetUserStats(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the get user stats.
        ''' </summary>
        ''' <param name="iasr">The async result.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.getUserStats")>
        Function EndGetUserStats(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.getUserGalleries"


        ''' <summary>
        ''' This methods return private galleries for logged user. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.getUserGalleries")>
        Function GetUserGalleries(apiKey As XmlRpc.Authentication, sessionId As String) As XmlRpcStruct()


        ''' <summary>
        ''' This methods return private galleries for logged user in async mode. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserGalleries")>
        Function BeginGetUserGalleries(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods return private galleries for logged user in async mode. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">User state object.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserGalleries")>
        Function BeginGetUserGalleries(apiKey As XmlRpc.Authentication, sessionId As String, acb As AsyncCallback, state As Object) As IAsyncResult


        ''' <summary>
        ''' Ends the get user galleries.
        ''' </summary>
        ''' <param name="iasr">The IAsyncResult object.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.getUserGalleries")>
        Function EndGetUserGalleries(iasr As IAsyncResult) As XmlRpcStruct()
#End Region

#Region "xmlrpc.getUserGalleryMedias"

        ''' <summary>
        ''' This methods allows to search media in logged user galleries or lightbox. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="page">Page number to display. Valid values: 1 to max results / nb_per_page</param>
        ''' <param name="nb_per_page">Maximum number of media returned. Valid values: 1 to 64.</param>
        ''' <param name="thumbnail_size">The thumbnail size.</param>
        ''' <param name="id">Gallery id. If not id sent, retrieve the content of the logged user Lightbox.</param>
        ''' <param name="detail_level">Detail level. If 1, add nb_downloads, nb_views and keywords for each medias.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcMethod("xmlrpc.getUserGalleryMedias")>
        Function GetUserGalleryMedias(apiKey As XmlRpc.Authentication, sessionId As String,
                                      page As Integer, nb_per_page As Integer,
                                      thumbnail_size As Integer, id As String,
                                      detail_level As Integer) As XmlRpcStruct

        ''' <summary>
        ''' This methods allows to search media in logged user galleries or lightbox (in async mode). 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="page">Page number to display. Valid values: 1 to max results / nb_per_page</param>
        ''' <param name="nb_per_page">Maximum number of media returned. Valid values: 1 to 64.</param>
        ''' <param name="thumbnail_size">The thumbnail size.</param>
        ''' <param name="id">Gallery id. If not id sent, retrieve the content of the logged user Lightbox.</param>
        ''' <param name="detail_level">Detail level. If 1, add nb_downloads, nb_views and keywords for each medias.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.getUserGalleryMedias")>
        Function BeginGetUserGalleryMedias(apiKey As XmlRpc.Authentication, sessionId As String,
                                           page As Integer, nb_per_page As Integer,
                                           thumbnail_size As Integer, id As String,
                                           detail_level As Integer, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods allows to search media in logged user galleries or lightbox (in async mode). 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="page">Page number to display. Valid values: 1 to max results / nb_per_page</param>
        ''' <param name="nb_per_page">Maximum number of media returned. Valid values: 1 to 64.</param>
        ''' <param name="thumbnail_size">The thumbnail size.</param>
        ''' <param name="id">Gallery id. If not id sent, retrieve the content of the logged user Lightbox.</param>
        ''' <param name="detail_level">Detail level. If 1, add nb_downloads, nb_views and keywords for each medias.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The object user state.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcBegin("xmlrpc.getUserGalleryMedias")>
        Function BeginGetUserGalleryMedias(apiKey As XmlRpc.Authentication, sessionId As String,
                                           page As Integer, nb_per_page As Integer,
                                           thumbnail_size As Integer, id As String,
                                           detail_level As Integer, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the get user gallery medias.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.getUserGalleryMedias")>
        Function EndGetUserGalleryMedias(iasr As IAsyncResult) As Object
#End Region

#Region "xmlrpc.createUserGallery"

        ''' <summary>
        ''' This methods allows you to create a new gallery in your account. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="name">Name of the gallery to create.</param>
        ''' <returns>Gallery unique ID. To get medias from a user gallery ID, use getUserGalleries.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.createUserGallery")>
        Function CreateUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, name As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods allows you to create a new gallery in your account in async mode. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="name">Name of the gallery to create.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns>Gallery unique ID. To get medias from a user gallery ID, use getUserGalleries.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.createUserGallery")>
        Function BeginCreateUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, name As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods allows you to create a new gallery in your account in async mode. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="name">Name of the gallery to create.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state object.</param>
        ''' <returns>Gallery unique ID. To get medias from a user gallery ID, use getUserGalleries.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.createUserGallery")>
        Function BeginCreateUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, name As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the create user gallery.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.createUserGallery")>
        Function EndCreateUserGallery(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.deleteUserGallery"

        ''' <summary>
        ''' This methods allows you to delete a gallery from your account.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="id">Id of the gallery to delete.</param>
        ''' <returns>Returns SUCCESS if gallery has been removed.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.deleteUserGallery")>
        Function DeleteUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, id As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods allows you to delete a gallery from your account in async mode.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="id">Id of the gallery to delete.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns>Returns SUCCESS if gallery has been removed.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.deleteUserGallery")>
        Function BeginDeleteUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, id As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods allows you to delete a gallery from your account in async mode.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="id">Id of the gallery to delete.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state object.</param>
        ''' <returns>Returns SUCCESS if gallery has been removed.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.deleteUserGallery")>
        Function BeginDeleteUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, id As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the delete user gallery.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.deleteUserGallery")>
        Function EndDeleteUserGallery(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.addToUserGallery"
        ''' <summary>
        ''' This methods allows you to add a content to your default lightbox or any of your existing galleries.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="content_id">Id of the content to add to the gallery.</param>
        ''' <param name="id">Id of the gallery.</param>
        ''' <returns>Returns SUCCESS if the content has been added.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.addToUserGallery")>
        Function AddToUserGallery(apiKey As XmlRpc.Authentication, sessionId As String,
                                   content_id As Integer, id As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods allows you to add a content to your default lightbox or any of your existing galleries in async mode.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="content_id">Id of the content to add to the gallery.</param>
        ''' <param name="id">Id of the gallery.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns>Returns SUCCESS if the content has been added.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.addToUserGallery")>
        Function BeginAddToUserGallery(apiKey As XmlRpc.Authentication, sessionId As String,
                                        content_id As Integer, id As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods allows you to add a content to your default lightbox or any of your existing galleries in async mode.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="content_id">Id of the content to add to the gallery.</param>
        ''' <param name="id">Id of the gallery.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state object.</param>
        ''' <returns>Returns SUCCESS if the content has been added.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.addToUserGallery")>
        Function BeginAddToUserGallery(apiKey As XmlRpc.Authentication, sessionId As String,
                                        content_id As Integer, id As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the add to user gallery.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.addToUserGallery")>
        Function EndAddToUserGallery(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.removeFromUserGallery"
        ''' <summary>
        ''' This methods allows you to remove a content from your default lightbox or any of your existing galleries.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="content_id">Id of the content to add to the gallery.</param>
        ''' <param name="id">Id of the gallery.</param>
        ''' <returns>Returns SUCCESS if the content has been removed.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.removeFromUserGallery")>
        Function RemoveFromUserGallery(apiKey As XmlRpc.Authentication, sessionId As String,
                                   content_id As Integer, id As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods allows you to remove a content from your default lightbox or any of your existing galleries in async mode.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="content_id">Id of the content to add to the gallery.</param>
        ''' <param name="id">Id of the gallery.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns>Returns SUCCESS if the content has been removed.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.removeFromUserGallery")>
        Function BeginRemoveFromUserGallery(apiKey As XmlRpc.Authentication, sessionId As String,
                                        content_id As Integer, id As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods allows you to remove a content from your default lightbox or any of your existing galleries in async mode.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="content_id">Id of the content to add to the gallery.</param>
        ''' <param name="id">Id of the gallery.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state object.</param>
        ''' <returns>Returns SUCCESS if the content has been removed.</returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.removeFromUserGallery")>
        Function BeginRemoveFromUserGallery(apiKey As XmlRpc.Authentication, sessionId As String,
                                        content_id As Integer, id As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the remove to user gallery.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.removeFromUserGallery")>
        Function EndRemoveFromUserGallery(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.getUserAdvancedStats"

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="type">Type of data to retrieve. Possible value: member_viewed_photos, member_downloaded_photos, member_bought_photos, member_earned_credits, all</param>
        ''' <param name="time_range">Group by clause. Possible values: day, week, month, quarter, year</param>
        ''' <param name="easy_date_period">Valid values for simple date statistics. Possible values: all, today, yesterday, one_day, two_days, three_days, one_week, one_month</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.getUserAdvancedStats")>
        Function GetUserAdvancedStats(apiKey As XmlRpc.Authentication, sessionId As String,
                                        type As String, time_range As String, easy_date_period As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="type">Type of data to retrieve. Possible value: member_viewed_photos, member_downloaded_photos, member_bought_photos, member_earned_credits, all</param>
        ''' <param name="time_range">Group by clause. Possible values: day, week, month, quarter, year</param>
        ''' <param name="easy_date_period">Valid values for simple date statistics. Possible values: all, today, yesterday, one_day, two_days, three_days, one_week, one_month</param>
        ''' <param name="start_date">Start date.</param>
        ''' <param name="end_date">End date.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.getUserAdvancedStats")>
        Function GetUserAdvancedStats2(apiKey As XmlRpc.Authentication, sessionId As String,
                                        type As String, time_range As String, easy_date_period As String,
                                        start_date As String, end_date As String) As XmlRpcStruct

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="type">Type of data to retrieve. Possible value: member_viewed_photos, member_downloaded_photos, member_bought_photos, member_earned_credits, all</param>
        ''' <param name="time_range">Group by clause. Possible values: day, week, month, quarter, year</param>
        ''' <param name="easy_date_period">Valid values for simple date statistics. Possible values: all, today, yesterday, one_day, two_days, three_days, one_week, one_month</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserAdvancedStats")>
        Function BeginGetUserAdvancedStats(apiKey As XmlRpc.Authentication, sessionId As String,
                                            type As String, time_range As String, easy_date_period As String,
                                            acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="type">Type of data to retrieve. Possible value: member_viewed_photos, member_downloaded_photos, member_bought_photos, member_earned_credits, all</param>
        ''' <param name="time_range">Group by clause. Possible values: day, week, month, quarter, year</param>
        ''' <param name="easy_date_period">Valid values for simple date statistics. Possible values: all, today, yesterday, one_day, two_days, three_days, one_week, one_month</param>
        ''' <param name="start_date">Start date.</param>
        ''' <param name="end_date">End date.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserAdvancedStats")>
        Function BeginGetUserAdvancedStats2(apiKey As XmlRpc.Authentication, sessionId As String,
                                            type As String, time_range As String, easy_date_period As String,
                                            start_date As String, end_date As String,
                                            acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="type">Type of data to retrieve. Possible value: member_viewed_photos, member_downloaded_photos, member_bought_photos, member_earned_credits, all</param>
        ''' <param name="time_range">Group by clause. Possible values: day, week, month, quarter, year</param>
        ''' <param name="easy_date_period">Valid values for simple date statistics. Possible values: all, today, yesterday, one_day, two_days, three_days, one_week, one_month</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state object.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserAdvancedStats")>
        Function BeginGetUserAdvancedStats(apiKey As XmlRpc.Authentication, sessionId As String,
                                            type As String, time_range As String, easy_date_period As String,
                                            acb As AsyncCallback, state As Object) As IAsyncResult


        ''' <summary>
        ''' This methods allows you to get sales/views/income statistics from your account. 
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The session id.</param>
        ''' <param name="type">Type of data to retrieve. Possible value: member_viewed_photos, member_downloaded_photos, member_bought_photos, member_earned_credits, all</param>
        ''' <param name="time_range">Group by clause. Possible values: day, week, month, quarter, year</param>
        ''' <param name="easy_date_period">Valid values for simple date statistics. Possible values: all, today, yesterday, one_day, two_days, three_days, one_week, one_month</param>
        ''' <param name="start_date">Start date.</param>
        ''' <param name="end_date">End date.</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user state object.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.getUserAdvancedStats")>
        Function BeginGetUserAdvancedStats2(apiKey As XmlRpc.Authentication, sessionId As String,
                                            type As String, time_range As String, easy_date_period As String,
                                            start_date As String, end_date As String,
                                            acb As AsyncCallback, state As Object) As IAsyncResult
        ''' <summary>
        ''' Ends the get user advanced stats.
        ''' </summary>
        ''' <param name="iasr">The iasr.</param>
        ''' <returns></returns>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.getUserAdvancedStats")>
        Function EndGetUserAdvancedStats(iasr As IAsyncResult) As XmlRpcStruct
#End Region

#Region "xmlrpc.moveUpMediaInUserGallery"

        ''' <summary>
        ''' Move a media up in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.moveUpMediaInUserGallery")>
        Sub MoveUpMediaInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String)

        ''' <summary>
        ''' Move a media up in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.moveUpMediaInUserGallery")>
        Function BeginMoveUpMediaInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' Move a media up in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user object state.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.moveUpMediaInUserGallery")>
        Function BeginMoveUpMediaInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the move up media in user gallery.
        ''' </summary>
        ''' <param name="iasr">The IAsyncResult.</param>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.moveUpMediaInUserGallery")>
        Sub EndMoveUpMediaInUserGallery(iasr As IAsyncResult)
#End Region

#Region "xmlrpc.moveDownMediaInUserGallery"

        ''' <summary>
        ''' Move a media down in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.moveDownMediaInUserGallery")>
        Sub MoveDownMediaInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String)

        ''' <summary>
        ''' Move a media down in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.moveDownMediaInUserGallery")>
        Function BeginMoveDownMediaInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' Move a media down in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user object state.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.moveDownMediaInUserGallery")>
        Function BeginMoveDownMediaInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the move down media in user gallery.
        ''' </summary>
        ''' <param name="iasr">The IAsyncResult.</param>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.moveDownMediaInUserGallery")>
        Sub EndMoveDownMediaInUserGallery(iasr As IAsyncResult)
#End Region

#Region "xmlrpc.moveMediaToTopInUserGallery"

        ''' <summary>
        ''' Move a media to the top position in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcMethod("xmlrpc.moveMediaToTopInUserGallery")>
        Sub MoveMediaToTopInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String)

        ''' <summary>
        ''' Move a media to the top position in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="acb">The async callback.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.moveMediaToTopInUserGallery")>
        Function BeginMoveMediaToTopInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String, acb As AsyncCallback) As IAsyncResult

        ''' <summary>
        ''' Move a media to the top position in an user gallery.
        ''' </summary>
        ''' <param name="apiKey">The API key.</param>
        ''' <param name="sessionId">The user session id.</param>
        ''' <param name="content_id">Existing media ID.</param>
        ''' <param name="id">User gallery ID ID. If empty the default user gallery will be used</param>
        ''' <param name="acb">The async callback.</param>
        ''' <param name="state">The user object state.</param>
        ''' <returns></returns>
        ''' <remarks>This method requires authentication with a valid session token.</remarks>
        <XmlRpcBegin("xmlrpc.moveMediaToTopInUserGallery")>
        Function BeginMoveMediaToTopInUserGallery(apiKey As XmlRpc.Authentication, sessionId As String, content_id As Integer, id As String, acb As AsyncCallback, state As Object) As IAsyncResult

        ''' <summary>
        ''' Ends the move a media to the top position in an user gallery.
        ''' </summary>
        ''' <param name="iasr">The IAsyncResult.</param>
        ''' <remarks></remarks>
        <XmlRpcEnd("xmlrpc.moveMediaToTopInUserGallery")>
        Sub EndMoveMediaToTopInUserGallery(iasr As IAsyncResult)
#End Region
    End Interface

End Namespace